<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Pragma" content="no-cache">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui" />
    <meta name="format-detection" content="telephone=no" />
    <title>批量购买激活码</title>
    <meta content="" name="keywords" />
    <meta content="" name="description" />
    <meta content="" name="copyright" />
    <meta content="" name="author" />
    <meta name="robots" content="noarchive">
    <link rel="stylesheet" href="css/public.css" />
    <link rel="stylesheet" href="css/style.css">
    <script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="layer/layer.js"></script>
    <script type="text/javascript" src="js/urlTool.js"></script>
</head>

<body class="bgf8">
    <!--头部-->
    <div class="return_top bgyellow">
        <a href="unionCenter.html">
            <span class="login_home cfff">返回</span>
        </a>
    </div>
    <!--//头部结束-->

    <!-- 批量购买激活码开始 -->
    <div class="pb120">
        <div class="mydata_inf bb pl20">
            <img src="temp/datags.png" class="mydata_inf_img mr20">
            <input placeholder="请填写购买数量" id="proNum" value="" type="number" class="mydata_inf_input mr20 fz28">
        </div>
        <div class="car_cont">
            <button class="w100 car_cont_submit fz32 cfff" id="buy_btn">确定</button>
        </div>
    </div>
    <!-- 批量购买激活码结束 -->

    <!--底部-->
    <div class="index-nav-footer w bt">
        <a href="index.html"><i class="home"></i>首页</a>
        <a href="javascript:;"><i class="shopCartclick"></i>购买激活码</a>
        <a href="ordercar.html" class="select-two"><i class="order"></i>订单</a>
        <a href="unionCenter.html"><i class="myCenter"></i>我的</a>
    </div>
    <!--//底部-->
    <script type="text/javascript">
        $("#buy_btn").on('click', function() {
            let that = $(this);
            let proNum = $("#proNum").val();
            if (parseInt(proNum) < 1) {
                layer.open({
                    content: '请填写正确的购买数量',
                    btn: '我知道了'
                });
                return false;
            }
            let reqData = {
                proId: '5843f242c0da45ea8005e9cf7255bfa0',
                proNum: proNum,
                orderType: 2
            };
            sm.req({
                url: '/sysOrder/creat',
                data: reqData,
                done: function(res) {
                    if (res.code == 200) {
                        location.href = "mybuy.html?orderNo=" + res.data.orderNo + "&orderPrice=" + res.data.orderPrice + "&proName=" + res.data.proName;
                    } else {
                        layer.open({
                            content: res.message,
                            btn: '我知道了'
                        })
                    }
                }
            });
        });
    </script>
</body>

</html>